# Maintainer: Florian Pritz <bluewind@archlinux.org>

pkgname=perl-cgi
pkgver=4.59
pkgrel=1
pkgdesc='Handle Common Gateway Interface requests and responses'
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.8.1' perl-html-parser)
checkdepends=(perl-test-nowarnings 'perl-test-warn>=0.3')
url=https://metacpan.org/release/CGI
source=("https://cpan.metacpan.org/authors/id/L/LE/LEEJO/CGI-$pkgver.tar.gz")
md5sums=(d9f99dd2e3d12f07e9bcd665cedabfb4)
sha512sums=(df0b6e87f6d31930cd861f758984cceb8bed1d38da9954401140b0af1f01031570aaed9c8769b53aee49283f462658aacbe97ecb7ebe9db734512a2ad3898bd7)
_ddir="CGI-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
